#ifndef ACTIVATION_THREAD_H
#define ACTIVATION_THREAD_H

#include <QObject>
#include <QThread>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/socket.h>
#include <linux/netlink.h>
#include <QTimer>
#include <QtDBus/QDBusConnection>

#define UEVENT_BUFFER_SIZE 2048

class activation_thread : public QThread
{
    Q_OBJECT
public:
    explicit activation_thread(QObject *parent = 0);

private:
    void run();

signals:
    void signal_ukey_activation(int activation);

};

class ukey_find_thread : public QThread
{
    Q_OBJECT
public:
    explicit ukey_find_thread(QObject *parent = 0);


    bool nameownerchange;
    QTimer *ukey_check_timer=nullptr;

private slots:
    void nameownerchanged(QString a, QString b, QString c);
    void ukey_ckeck();

private:
    void run();

signals:
    void found_ukey(int);
    void ukey_ckeck_result(int);
};

#endif // ACTIVATION_THREAD_H


